{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "273ad3b4",
   "metadata": {},
   "source": [
    "https://www.joinquant.com/view/user/floor?type=mainFloor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "90e5dcc3",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入函数库\n",
    "from jqdata import *\n",
    "\n",
    "def initialize(context):\n",
    "    # 设定沪深300作为基准\n",
    "    set_benchmark('000300.XSHG')\n",
    "    # 开启动态复权模式(真实价格)\n",
    "    set_option('use_real_price', True)\n",
    "    # 股票类每笔交易时的手续费是：买入时佣金万分之三，卖出时佣金万分之三加千分之一印花税, 每笔交易佣金最低扣5块钱\n",
    "    set_order_cost(OrderCost(close_tax=0.001, open_commission=0.0003, close_commission=0.0003, min_commission=5), type='stock')\n",
    "    # 持股数量\n",
    "    g.N = 10\n",
    "    run_monthly(handle, 1)\n",
    "\n",
    "\n",
    "def handle(context):\n",
    "    stocks = get_index_stocks('000300.XSHG')\n",
    "    # print(stocks)\n",
    "    \n",
    "    # 沪深300股票的过去30天(不包含今天)的每天的收盘价\n",
    "    df_close = history(30, field='close', security_list=list(stocks)).T\n",
    "    # 加入一列——每只股票这30天收益率\n",
    "    df_close['ret'] = (df_close.iloc[:,-1]-df_close.iloc[:,0]) / df_close.iloc[:,0]\n",
    "    # ascending=False:根据收益率降序排列——动量策略\n",
    "    # ascending=True:根据收益率升序排列——反转策略\n",
    "    sorted_stocks = df_close.sort_values('ret', ascending=False).index\n",
    "    # 找到收益最大/最小的N只股票\n",
    "    to_hold = sorted_stocks[:g.N]\n",
    "\n",
    "    for stock in context.portfolio.positions:\n",
    "        if stock not in to_hold:\n",
    "            order_target_value(stock, 0)\n",
    "            \n",
    "    to_buy = [stock for stock in to_hold if stock not in context.portfolio.positions]\n",
    "    \n",
    "    if len(to_buy) > 0:\n",
    "        cash_per_stock = context.portfolio.available_cash / len(to_buy)\n",
    "        for stock in to_buy:\n",
    "            order_value(stock, cash_per_stock)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "initial_id",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:43.776296Z",
     "start_time": "2024-03-07T03:24:43.764293Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import pickle\n",
    "from datetime import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "de62faf90aac7058",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:44.983349Z",
     "start_time": "2024-03-07T03:24:44.739212Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "csitrade=pd.read_csv('D:/服务器/all/baselines/hs300_2018_2023.csv')\n",
    "# csitrade.rename(columns={'Close':'close'},inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "4224a785bc835b45",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:44.998716Z",
     "start_time": "2024-03-07T03:24:44.986351Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#数据一定要按股票排序\n",
    "csitrade.sort_values(['kdcode','dt'],inplace=True)\n",
    "csitrade['close_r']=csitrade['close']/csitrade['close'].shift(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "8b15d3d6a5df201",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:45.014983Z",
     "start_time": "2024-03-07T03:24:45.001982Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "csitrade.reset_index(inplace=True,drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "e55105a9d1b9e154",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:45.059945Z",
     "start_time": "2024-03-07T03:24:45.018984Z"
    },
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>kdcode</th>\n",
       "      <th>dt</th>\n",
       "      <th>close</th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>prev_close</th>\n",
       "      <th>adjfactor</th>\n",
       "      <th>turnover</th>\n",
       "      <th>volume</th>\n",
       "      <th>close_r</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000001.SZ</td>\n",
       "      <td>2018-01-02</td>\n",
       "      <td>13.70</td>\n",
       "      <td>13.35</td>\n",
       "      <td>13.93</td>\n",
       "      <td>13.32</td>\n",
       "      <td>13.30</td>\n",
       "      <td>101.992244</td>\n",
       "      <td>2.856544e+09</td>\n",
       "      <td>208159255.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000001.SZ</td>\n",
       "      <td>2018-01-03</td>\n",
       "      <td>13.33</td>\n",
       "      <td>13.73</td>\n",
       "      <td>13.86</td>\n",
       "      <td>13.20</td>\n",
       "      <td>13.70</td>\n",
       "      <td>101.992244</td>\n",
       "      <td>4.006221e+09</td>\n",
       "      <td>296249838.0</td>\n",
       "      <td>0.972993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000001.SZ</td>\n",
       "      <td>2018-01-04</td>\n",
       "      <td>13.25</td>\n",
       "      <td>13.32</td>\n",
       "      <td>13.37</td>\n",
       "      <td>13.13</td>\n",
       "      <td>13.33</td>\n",
       "      <td>101.992244</td>\n",
       "      <td>2.454544e+09</td>\n",
       "      <td>185450948.0</td>\n",
       "      <td>0.993998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>000001.SZ</td>\n",
       "      <td>2018-01-05</td>\n",
       "      <td>13.30</td>\n",
       "      <td>13.21</td>\n",
       "      <td>13.35</td>\n",
       "      <td>13.15</td>\n",
       "      <td>13.25</td>\n",
       "      <td>101.992244</td>\n",
       "      <td>1.603290e+09</td>\n",
       "      <td>121031272.0</td>\n",
       "      <td>1.003774</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>000001.SZ</td>\n",
       "      <td>2018-01-08</td>\n",
       "      <td>12.96</td>\n",
       "      <td>13.25</td>\n",
       "      <td>13.29</td>\n",
       "      <td>12.86</td>\n",
       "      <td>13.30</td>\n",
       "      <td>101.992244</td>\n",
       "      <td>2.806099e+09</td>\n",
       "      <td>215862081.0</td>\n",
       "      <td>0.974436</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>437095</th>\n",
       "      <td>688981.SH</td>\n",
       "      <td>2023-12-25</td>\n",
       "      <td>53.01</td>\n",
       "      <td>54.60</td>\n",
       "      <td>55.00</td>\n",
       "      <td>52.85</td>\n",
       "      <td>54.79</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>9.541097e+08</td>\n",
       "      <td>17788400.0</td>\n",
       "      <td>0.967512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>437096</th>\n",
       "      <td>688981.SH</td>\n",
       "      <td>2023-12-26</td>\n",
       "      <td>51.85</td>\n",
       "      <td>53.01</td>\n",
       "      <td>53.23</td>\n",
       "      <td>51.80</td>\n",
       "      <td>53.01</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.540936e+08</td>\n",
       "      <td>14401600.0</td>\n",
       "      <td>0.978117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>437097</th>\n",
       "      <td>688981.SH</td>\n",
       "      <td>2023-12-27</td>\n",
       "      <td>51.91</td>\n",
       "      <td>51.83</td>\n",
       "      <td>52.29</td>\n",
       "      <td>51.18</td>\n",
       "      <td>51.85</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.864514e+08</td>\n",
       "      <td>15173500.0</td>\n",
       "      <td>1.001157</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>437098</th>\n",
       "      <td>688981.SH</td>\n",
       "      <td>2023-12-28</td>\n",
       "      <td>53.13</td>\n",
       "      <td>51.70</td>\n",
       "      <td>53.45</td>\n",
       "      <td>51.68</td>\n",
       "      <td>51.91</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.015243e+09</td>\n",
       "      <td>19211900.0</td>\n",
       "      <td>1.023502</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>437099</th>\n",
       "      <td>688981.SH</td>\n",
       "      <td>2023-12-29</td>\n",
       "      <td>53.02</td>\n",
       "      <td>53.00</td>\n",
       "      <td>53.50</td>\n",
       "      <td>52.88</td>\n",
       "      <td>53.13</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>6.719192e+08</td>\n",
       "      <td>12648700.0</td>\n",
       "      <td>0.997930</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>437100 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           kdcode          dt  close   open   high    low  prev_close  \\\n",
       "0       000001.SZ  2018-01-02  13.70  13.35  13.93  13.32       13.30   \n",
       "1       000001.SZ  2018-01-03  13.33  13.73  13.86  13.20       13.70   \n",
       "2       000001.SZ  2018-01-04  13.25  13.32  13.37  13.13       13.33   \n",
       "3       000001.SZ  2018-01-05  13.30  13.21  13.35  13.15       13.25   \n",
       "4       000001.SZ  2018-01-08  12.96  13.25  13.29  12.86       13.30   \n",
       "...           ...         ...    ...    ...    ...    ...         ...   \n",
       "437095  688981.SH  2023-12-25  53.01  54.60  55.00  52.85       54.79   \n",
       "437096  688981.SH  2023-12-26  51.85  53.01  53.23  51.80       53.01   \n",
       "437097  688981.SH  2023-12-27  51.91  51.83  52.29  51.18       51.85   \n",
       "437098  688981.SH  2023-12-28  53.13  51.70  53.45  51.68       51.91   \n",
       "437099  688981.SH  2023-12-29  53.02  53.00  53.50  52.88       53.13   \n",
       "\n",
       "         adjfactor      turnover       volume   close_r  \n",
       "0       101.992244  2.856544e+09  208159255.0       NaN  \n",
       "1       101.992244  4.006221e+09  296249838.0  0.972993  \n",
       "2       101.992244  2.454544e+09  185450948.0  0.993998  \n",
       "3       101.992244  1.603290e+09  121031272.0  1.003774  \n",
       "4       101.992244  2.806099e+09  215862081.0  0.974436  \n",
       "...            ...           ...          ...       ...  \n",
       "437095    1.000000  9.541097e+08   17788400.0  0.967512  \n",
       "437096    1.000000  7.540936e+08   14401600.0  0.978117  \n",
       "437097    1.000000  7.864514e+08   15173500.0  1.001157  \n",
       "437098    1.000000  1.015243e+09   19211900.0  1.023502  \n",
       "437099    1.000000  6.719192e+08   12648700.0  0.997930  \n",
       "\n",
       "[437100 rows x 11 columns]"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "csitrade"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "a97c69378011465e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:45.311882Z",
     "start_time": "2024-03-07T03:24:45.062945Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "df=csitrade\n",
    "df['ret']=np.nan\n",
    "df.rename(columns={'kdcode':'instrument','dt':'datetime'},inplace=True)\n",
    "# df.rename(columns={'company':'instrument','Date':'datetime'},inplace=True)\n",
    "df['datetime'] = df['datetime'].astype('datetime64[ns]')\n",
    "date_unique=df['datetime'].unique()\n",
    "ins_unique=df['instrument'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "id": "619a4f44d7d9aeb3",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:24:45.326887Z",
     "start_time": "2024-03-07T03:24:45.314884Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "choice = 1\n",
    "num = 16"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "id": "4611f0ff4efef9d3",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.055791Z",
     "start_time": "2024-03-07T03:24:45.328886Z"
    },
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:34: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:36: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
      "d:\\LenovoSoftstore\\conda3\\envs\\pytorch\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3505: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "C:\\Users\\Liyt\\AppData\\Local\\Temp\\ipykernel_33872\\1087805611.py:37: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_tic.dropna(how='any',inplace=True)\n"
     ]
    },
    {
     "ename": "ValueError",
     "evalue": "Day out of range in datetime string \"2023-06-31\"",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[164], line 64\u001b[0m\n\u001b[0;32m     61\u001b[0m         df_return\u001b[38;5;241m=\u001b[39mdf_return\u001b[38;5;241m.\u001b[39mappend(b,ignore_index\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[0;32m     63\u001b[0m \u001b[38;5;66;03m# 对于7月1日后的日期，重复上述过程\u001b[39;00m\n\u001b[1;32m---> 64\u001b[0m day630\u001b[38;5;241m=\u001b[39mdff_ret[dff_ret[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdatetime\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m==\u001b[39m\u001b[43mnp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdatetime64\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m2023-06-31\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m]\n\u001b[0;32m     65\u001b[0m sma_ins\u001b[38;5;241m=\u001b[39mday630\u001b[38;5;241m.\u001b[39mnsmallest(num,columns\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mret\u001b[39m\u001b[38;5;124m'\u001b[39m)\u001b[38;5;241m.\u001b[39minstrument\n\u001b[0;32m     66\u001b[0m larg_ins\u001b[38;5;241m=\u001b[39mday630\u001b[38;5;241m.\u001b[39mnlargest(num,columns\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mret\u001b[39m\u001b[38;5;124m'\u001b[39m)\u001b[38;5;241m.\u001b[39minstrument\n",
      "\u001b[1;31mValueError\u001b[0m: Day out of range in datetime string \"2023-06-31\""
     ]
    }
   ],
   "source": [
    "if choice == 1:\n",
    "    #动量策略\n",
    "    dff_ret=pd.DataFrame()\n",
    "    # 遍历股票\n",
    "    for ins in ins_unique:\n",
    "        # 选特点股票数据\n",
    "        df_tic=df[df['instrument']==ins]\n",
    "        df_tic.reset_index(inplace=True)\n",
    "        # 股票数据每一行\n",
    "        for i in range(0,len(df_tic)):\n",
    "            # 23年以后\n",
    "            if df_tic['datetime'][i]>datetime(2023,1,1):\n",
    "                flag = 0\n",
    "                date=df_tic['datetime'][i]\n",
    "                # 找到当前日期的位置\n",
    "                loc=np.where(date_unique==date)\n",
    "                # 找到80天前的日期位置\n",
    "                predate_loc=np.where(date_unique==date)[0][0]-60\n",
    "                date_pre=date_unique[predate_loc]\n",
    "                # 如果80天前的收盘价存在\n",
    "                if len(df_tic.loc[df_tic['datetime']==date_pre]['close'].values):\n",
    "                    x=df_tic.loc[df_tic['datetime']==date_pre]['close'].values[0]\n",
    "                else:\n",
    "                    flag = 1  # 标记为1，表示80天前的数据不存在\n",
    "                \n",
    "                # 找到前一天的日期位置\n",
    "                yestdaydate_loc=np.where(date_unique==date)[0][0]-1\n",
    "                date_yest=date_unique[yestdaydate_loc]\n",
    "                if len(df_tic.loc[df_tic['datetime']==date_pre]['close'].values):\n",
    "                    y=df_tic.loc[df_tic['datetime']==date_yest]['close'].values[0]\n",
    "                else:\n",
    "                    flag = 1\n",
    "                if flag:\n",
    "                    df_tic['ret'][i] = 0  # 如果数据不完整，则返回值设置为0\n",
    "                    continue\n",
    "                df_tic['ret'][i]=(y-x)/x  # 计算收益率\n",
    "        df_tic.dropna(how='any',inplace=True)\n",
    "        dff_ret=pd.concat([dff_ret,df_tic],axis=0)  # 将处理后的数据合并\n",
    "    dff_ret.reset_index(inplace=True)\n",
    "    ret_date_unique=dff_ret['datetime'].unique()  # 获取有收益数据的独特日期\n",
    "    \n",
    "    # 选择特定日期的股票，并计算最小和最大收益的股票标识符\n",
    "    day=dff_ret[dff_ret['datetime']==np.datetime64('2023-01-03')]\n",
    "    sma_ins=day.nsmallest(num,columns='ret').instrument\n",
    "    larg_ins=day.nlargest(num,columns='ret').instrument\n",
    "    \n",
    "    df_return=pd.DataFrame()\n",
    "    for date in ret_date_unique:   # 遍历每一个有收益数据的日期\n",
    "        if date < np.datetime64('2023-07-01'):\n",
    "            x_day=dff_ret[dff_ret['datetime']==date]\n",
    "            r_day=0\n",
    "            for instrument in larg_ins:  # 计算大收益股票的平均收益\n",
    "                one_day = 0\n",
    "                if len(x_day[x_day['instrument']==instrument]['close_r'].values):\n",
    "                    one_day=x_day[x_day['instrument']==instrument]['close_r'].values[0]\n",
    "                r_day=r_day+one_day\n",
    "            for instrument in sma_ins:  # 从结果中减去小收益股票的平均收益\n",
    "                r_day=r_day-1\n",
    "            r_day=r_day/num  # 计算平均日收益\n",
    "            b={'datetime':date,'daily_return':r_day}\n",
    "            df_return=df_return.append(b,ignore_index=True)\n",
    "    \n",
    "    # 对于7月1日后的日期，重复上述过程\n",
    "    day630=dff_ret[dff_ret['datetime']==np.datetime64('2023-06-31')]\n",
    "    sma_ins=day630.nsmallest(num,columns='ret').instrument\n",
    "    larg_ins=day630.nlargest(num,columns='ret').instrument\n",
    "    for date in ret_date_unique:\n",
    "        if date >= np.datetime64('2023-07-01'):\n",
    "            x_day=dff_ret[dff_ret['datetime']==date]\n",
    "            r_day=0\n",
    "            for instrument in larg_ins:\n",
    "                one_day = 0\n",
    "                if len(x_day[x_day['instrument']==instrument]['close_r'].values):\n",
    "                    one_day=x_day[x_day['instrument']==instrument]['close_r'].values[0]\n",
    "                r_day=r_day+one_day\n",
    "            for instrument in sma_ins:\n",
    "                one_day = 0\n",
    "                if len(x_day[x_day['instrument']==instrument]['close_r'].values):\n",
    "                    one_day=x_day[x_day['instrument']==instrument]['close_r'].values[0]\n",
    "                r_day=r_day-one_day\n",
    "            r_day=r_day/num\n",
    "            b={'datetime':date,'daily_return':r_day}\n",
    "            df_return=df_return.append(b,ignore_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "7b5857c4f8b7db2b",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.120226Z",
     "start_time": "2024-03-07T03:26:44.057790Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "if choice == 0:\n",
    "    #反转策略\n",
    "    dff_ret=pd.DataFrame()\n",
    "    for ins in ins_unique:\n",
    "        df_tic=df[df['instrument']==ins]\n",
    "        df_tic.reset_index(inplace=True)\n",
    "        for i in range(0,len(df_tic)):\n",
    "            if df_tic['datetime'][i]>datetime(2023,1,1):\n",
    "                date=df_tic['datetime'][i]\n",
    "                loc=np.where(date_unique==date)\n",
    "                predate_loc=np.where(date_unique==date)[0][0]-20\n",
    "                date_pre=date_unique[predate_loc]\n",
    "                x=df_tic.loc[df_tic['datetime']==date_pre]['close'].values[0]\n",
    "                yestdaydate_loc=np.where(date_unique==date)[0][0]-1\n",
    "                date_yest=date_unique[yestdaydate_loc]\n",
    "                y=df_tic.loc[df_tic['datetime']==date_yest]['close'].values[0]\n",
    "                df_tic['ret'][i]=(y-x)/x\n",
    "        df_tic.dropna(how='any',inplace=True)\n",
    "        dff_ret=pd.concat([dff_ret,df_tic],axis=0)\n",
    "    dff_ret.reset_index(inplace=True)\n",
    "    ret_date_unique=dff_ret['datetime'].unique()\n",
    "    \n",
    "    df_return=pd.DataFrame()\n",
    "    \n",
    "    day104=dff_ret[dff_ret['datetime']==np.datetime64('2023-01-03')]\n",
    "    sma_ins=day104.nsmallest(9,columns='ret').instrument\n",
    "    larg_ins=day104.nlargest(9,columns='ret').instrument\n",
    "    for date in ret_date_unique:\n",
    "        if date < np.datetime64('2023-08-01'):\n",
    "            x_day=dff_ret[dff_ret['datetime']==date]\n",
    "            r_day=0\n",
    "            for instrument in larg_ins:\n",
    "                r_day=r_day-1\n",
    "            for instrument in sma_ins:\n",
    "                one_day = 0\n",
    "                if len(x_day[x_day['instrument']==instrument]['close_r'].values):\n",
    "                    one_day=x_day[x_day['instrument']==instrument]['close_r'].values[0]\n",
    "                r_day=r_day+one_day\n",
    "            r_day=r_day/9\n",
    "            b={'datetime':date,'daily_return':r_day}\n",
    "            df_return=df_return._append(b,ignore_index=True)\n",
    "            \n",
    "    day630=dff_ret[dff_ret['datetime']==np.datetime64('2023-07-31')]\n",
    "    sma_ins=day630.nsmallest(9,columns='ret').instrument\n",
    "    larg_ins=day630.nlargest(9,columns='ret').instrument\n",
    "    for date in ret_date_unique:\n",
    "        if date >= np.datetime64('2023-08-01'):\n",
    "            x_day=dff_ret[dff_ret['datetime']==date]\n",
    "            r_day=0\n",
    "            for instrument in larg_ins:\n",
    "                one_day = 0\n",
    "                if len(x_day[x_day['instrument']==instrument]['close_r'].values):\n",
    "                    one_day=x_day[x_day['instrument']==instrument]['close_r'].values[0]\n",
    "                r_day=r_day-one_day\n",
    "            for instrument in sma_ins:\n",
    "                one_day = 0\n",
    "                if len(x_day[x_day['instrument']==instrument]['close_r'].values):\n",
    "                    one_day=x_day[x_day['instrument']==instrument]['close_r'].values[0]\n",
    "                r_day=r_day+one_day\n",
    "            r_day=r_day/9\n",
    "            b={'datetime':date,'daily_return':r_day}\n",
    "            df_return=df_return._append(b,ignore_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "id": "58351e6f6a208bf",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.166194Z",
     "start_time": "2024-03-07T03:26:44.123227Z"
    },
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>daily_return</th>\n",
       "      <th>datetime</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.020629</td>\n",
       "      <td>2023-01-03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.011750</td>\n",
       "      <td>2023-01-04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.020905</td>\n",
       "      <td>2023-01-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.001986</td>\n",
       "      <td>2023-01-06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.008500</td>\n",
       "      <td>2023-01-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>237</th>\n",
       "      <td>0.130800</td>\n",
       "      <td>2023-12-25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>238</th>\n",
       "      <td>0.110339</td>\n",
       "      <td>2023-12-26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>239</th>\n",
       "      <td>0.130201</td>\n",
       "      <td>2023-12-27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>240</th>\n",
       "      <td>0.100544</td>\n",
       "      <td>2023-12-28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>241</th>\n",
       "      <td>0.138472</td>\n",
       "      <td>2023-12-29</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>242 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     daily_return   datetime\n",
       "0        0.020629 2023-01-03\n",
       "1        0.011750 2023-01-04\n",
       "2        0.020905 2023-01-05\n",
       "3       -0.001986 2023-01-06\n",
       "4        0.008500 2023-01-09\n",
       "..            ...        ...\n",
       "237      0.130800 2023-12-25\n",
       "238      0.110339 2023-12-26\n",
       "239      0.130201 2023-12-27\n",
       "240      0.100544 2023-12-28\n",
       "241      0.138472 2023-12-29\n",
       "\n",
       "[242 rows x 2 columns]"
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_return"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "b968490c581363e1",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.214205Z",
     "start_time": "2024-03-07T03:26:44.176196Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "portfolio_df_performance = df_return.set_index(['datetime'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "id": "7ef5eee063991a9e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.245720Z",
     "start_time": "2024-03-07T03:26:44.220206Z"
    },
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>daily_return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>datetime</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2023-01-03</th>\n",
       "      <td>0.020629</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-04</th>\n",
       "      <td>0.011750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-05</th>\n",
       "      <td>0.020905</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-06</th>\n",
       "      <td>-0.001986</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-09</th>\n",
       "      <td>0.008500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-12-25</th>\n",
       "      <td>0.130800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-12-26</th>\n",
       "      <td>0.110339</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-12-27</th>\n",
       "      <td>0.130201</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-12-28</th>\n",
       "      <td>0.100544</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-12-29</th>\n",
       "      <td>0.138472</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>242 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            daily_return\n",
       "datetime                \n",
       "2023-01-03      0.020629\n",
       "2023-01-04      0.011750\n",
       "2023-01-05      0.020905\n",
       "2023-01-06     -0.001986\n",
       "2023-01-09      0.008500\n",
       "...                  ...\n",
       "2023-12-25      0.130800\n",
       "2023-12-26      0.110339\n",
       "2023-12-27      0.130201\n",
       "2023-12-28      0.100544\n",
       "2023-12-29      0.138472\n",
       "\n",
       "[242 rows x 1 columns]"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "portfolio_df_performance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "id": "61285b937807e29d",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.261167Z",
     "start_time": "2024-03-07T03:26:44.249164Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "ARR = (portfolio_df_performance['daily_return']+1).cumprod()\n",
    "# ARR.to_csv(\"BLSW.csv\", index=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "id": "c288329d25187a89",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.290994Z",
     "start_time": "2024-03-07T03:26:44.264168Z"
    },
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime\n",
       "2023-01-03    1.020629\n",
       "2023-01-04    1.032620\n",
       "2023-01-05    1.054207\n",
       "2023-01-06    1.052113\n",
       "2023-01-09    1.061056\n",
       "                ...   \n",
       "2023-12-25    3.944357\n",
       "2023-12-26    4.379574\n",
       "2023-12-27    4.949801\n",
       "2023-12-28    5.447474\n",
       "2023-12-29    6.201797\n",
       "Name: daily_return, Length: 242, dtype: float64"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ARR"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "id": "906f410a99fc1482",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.383624Z",
     "start_time": "2024-03-07T03:26:44.297995Z"
    },
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "alpha_df_performance = pd.DataFrame()\n",
    "alpha_df_performance['portfolio_daily_return'] = portfolio_df_performance['daily_return']\n",
    "alpha_df_performance['portfolio_net_value'] = (alpha_df_performance['portfolio_daily_return'] + 1).cumprod()\n",
    "\n",
    "net_value_columns = ['portfolio_net_value']\n",
    "\n",
    "alpha_statistics_df = pd.DataFrame(index=alpha_df_performance[net_value_columns].columns,\n",
    "                                    columns=[\"年化收益\", \"年化波动率\", \"最大回撤率\", \"夏普率\", \"Calmar\", \"IR\"])\n",
    "\n",
    "# alpha_df_performance.set_index(\"dt\", inplace=True)\n",
    "alpha_df_performance.index = pd.to_datetime(alpha_df_performance.index)\n",
    "monthly_statistics_df = alpha_df_performance[net_value_columns].resample('m').last()\n",
    "monthly_statistics_df = pd.concat([alpha_df_performance[:1][\n",
    "                                        ['portfolio_net_value']],\n",
    "                                    monthly_statistics_df])\n",
    "monthly_statistics_df = monthly_statistics_df.pct_change()\n",
    "monthly_statistics_df = monthly_statistics_df.dropna()\n",
    "monthly_statistics_df.index = monthly_statistics_df.index.date\n",
    "## TODO 补充第一年的数据\n",
    "yearly_statistics_df = alpha_df_performance[net_value_columns].resample('y').last()\n",
    "yearly_statistics_df = pd.concat([alpha_df_performance[:1][\n",
    "                                        ['portfolio_net_value']],\n",
    "                                    yearly_statistics_df])\n",
    "yearly_statistics_df = yearly_statistics_df.pct_change()\n",
    "yearly_statistics_df = yearly_statistics_df.dropna()\n",
    "yearly_statistics_df.index = yearly_statistics_df.index.date\n",
    "\n",
    "alpha_statistics_df.loc[:, \"年化收益\"] = np.mean(\n",
    "    (alpha_df_performance[net_value_columns].tail(1)) ** (252 / len(alpha_df_performance)) - 1)\n",
    "alpha_statistics_df.loc[:, \"年化波动率\"] = np.std(\n",
    "    alpha_df_performance[net_value_columns] / alpha_df_performance[net_value_columns].shift(1) - 1) * np.sqrt(\n",
    "    252)\n",
    "alpha_statistics_df.loc[:, \"累积收益\"] = np.mean(alpha_df_performance[net_value_columns].tail(1) - 1)\n",
    "alpha_statistics_df.loc[:, \"累积波动率\"] = np.std(\n",
    "    alpha_df_performance[net_value_columns] / alpha_df_performance[net_value_columns].shift(1) - 1)\n",
    "alpha_statistics_df.loc[:, \"最大回撤率\"] = np.min(\n",
    "    (alpha_df_performance[net_value_columns] - alpha_df_performance[net_value_columns].cummax()) /\n",
    "    alpha_df_performance[net_value_columns].cummax())\n",
    "alpha_statistics_df.loc[:, \"夏普率\"] = alpha_statistics_df[\"年化收益\"] / alpha_statistics_df[\"年化波动率\"]\n",
    "alpha_statistics_df.loc[:, \"Calmar\"] = alpha_statistics_df[\"年化收益\"] / abs(alpha_statistics_df[\"最大回撤率\"])\n",
    "alpha_statistics_df.loc[:, \"IR\"] = np.mean(\n",
    "    alpha_df_performance[net_value_columns] / alpha_df_performance[net_value_columns].shift(1) - 1) * np.sqrt(\n",
    "    252) / np.std(alpha_df_performance[net_value_columns] / alpha_df_performance[net_value_columns].shift(1) - 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "id": "611960a85afea1fd",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-03-07T03:26:44.414226Z",
     "start_time": "2024-03-07T03:26:44.385997Z"
    },
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>年化收益</th>\n",
       "      <th>年化波动率</th>\n",
       "      <th>最大回撤率</th>\n",
       "      <th>夏普率</th>\n",
       "      <th>Calmar</th>\n",
       "      <th>IR</th>\n",
       "      <th>累积收益</th>\n",
       "      <th>累积波动率</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>portfolio_net_value</th>\n",
       "      <td>5.687537</td>\n",
       "      <td>0.515385</td>\n",
       "      <td>-0.216737</td>\n",
       "      <td>11.035506</td>\n",
       "      <td>26.241698</td>\n",
       "      <td>3.916189</td>\n",
       "      <td>5.201797</td>\n",
       "      <td>0.032466</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                         年化收益     年化波动率     最大回撤率        夏普率     Calmar  \\\n",
       "portfolio_net_value  5.687537  0.515385 -0.216737  11.035506  26.241698   \n",
       "\n",
       "                           IR      累积收益     累积波动率  \n",
       "portfolio_net_value  3.916189  5.201797  0.032466  "
      ]
     },
     "execution_count": 163,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alpha_statistics_df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "10282c42652a7b98",
   "metadata": {
    "collapsed": false
   },
   "source": [
    "BLSW（反转策略），CGM(动量策略)\n",
    "ASR = ARR / AVol;   CR = ARR / abs(MDD)\n",
    "              ARR    AVol    MDD    ASR    CR    IR\n",
    "hs300  CGM  -0.265  0.204  -0.372 -1.298 -0.713 -1.439\n",
    "       BLSW  0.127  0.195  -0.174  0.651  0.730  0.682\n",
    "       \n",
    "zz500  CGM   0.015  0.229  -0.179  0.066  0.084  0.001\n",
    "       BLSW  0.110  0.227  -0.155  0.485  0.710  0.446\n",
    "      \n",
    "sp500  CGM   0.099  0.250  -0.139  0.396  0.712  0.584\n",
    "       BLSW  0.199  0.318  -0.223  0.626  0.892  0.774\n",
    "   \n",
    "nas100 CGM   0.116  0.242  -0.145  0.479  0.800  0.603\n",
    "       BLSW  0.368  0.339  -0.222  1.086  1.658  1.194"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "80b8c3c76f78205a",
   "metadata": {
    "collapsed": false
   },
   "source": [
    "BLSW(反转策略), CGM(动量策略), AS(AlphaStock)\n",
    "ASR = ARR / AVol;   CR = ARR / abs(MDD)\n",
    "               ARR    AVol    MDD    ASR    CR    IR\n",
    "data_1  CGM   0.014  0.198  -0.214  0.069  0.064  0.066\n",
    "        BLSW -0.209  0.214  -0.341 -0.975 -0.613 -1.082\n",
    "        AS   -0.121  0.116  -0.200 -1.046 -0.608 -1.062"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
